<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改用户</title>
<link href="/res/css/style.css" rel="stylesheet" type="text/css" />
<link href="/res/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/res/js/jquery.js"></script>
<script type="text/javascript" src="/res/js/select-ui.min.js"></script>
<script type="text/javascript" src="/res/js/lib/formvalid/FormValid.js"></script>
<link href="/res/js/lib/layer/skin/layer.css" rel="stylesheet" type="text/css" />
<link href="/res/js/lib/layer/skin/layer.ext.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/res/js/lib/layer/layer.js"></script>
<script type="text/javascript" src="/res/js/common/msgTools.js"></script>
<script type="text/javascript" src="/res/js/pages/system/adminRoles.js"></script>
<style>
body{min-width: auto;padding:20px;}
 .role{line-height:40px;}
 .role ul{margin:0px;padding:0px;}
 .role li{float: left;display: block;width:180px;}
 .role label{cursor: pointer!important;font-size: 16px;}
 .role .bottom{text-align: center;margin-top:50px;}
</style>
<script type="text/javascript">
	$(document).ready(function(e) {
		$("select").uedSelect({});
	});
</script>
</head>

<body style="overflow-x:hidden;">
	<div>
		<form action="/system/admin/roles/save/" method="post" onsubmit="return checkData(this)">
			<div class="role">
			   <ul>
				<c:forEach items="${roleList}" var="role">
				     <li>
				      <input id="chkRole_${role.id}" name="roleId" type="checkbox" value="${role.id}" />
				      <label for="chkRole_${role.id}">${role.name}</label>
				     </li>
				</c:forEach>
				</ul>
				<div style="clear:both;"></div>
				<div class="bottom"><input type="submit" class="btn" value="保 存" /></div>								
			</div>	
			<input type="hidden" value="${id}" name="id"/>
		</form>
	</div>
	${actionMsg}
	
	<script>
	   var perms=${perms};
	   $(function(){
		   $(perms).each(function(i,o){
			   $("#chkRole_"+o).get(0).checked=true
		   });		   
	   });	
	</script>
</body>

</html>


